Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow negative coinbase profit in Order::Tx and Order::Bundle #233

Merged
merged 2 commits into from
Nov 2, 2024

Conversation

liamaharon
Copy link
Contributor

When disallowed for all Order varients, the coinbase account has no way to spend funds when rbuilder is building all blocks for a chain.

Instead of using saturating_sub, I also tried changing coinbase_profit from a U256 to an I256, but ran into issues where a U256 is required to calculate stuff like mev_gas_price in later logic. I'd prefer that approach if anyone knows if it is feasible.

Copy link
Contributor

@dvush dvush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I think this is a good approach.

crates/rbuilder/src/building/order_commit.rs Show resolved Hide resolved
@ferranbt ferranbt mentioned this pull request Oct 31, 2024
3 tasks
Copy link

github-actions bot commented Nov 1, 2024

Benchmark results for 3620348

Report: https://flashbots-rbuilder-ci-stats.s3.us-east-2.amazonaws.com/benchmark/3620348-e79af73/report/index.html

Date (UTC) 2024-11-01T13:27:02+00:00
Commit 3620348d2d7396d65ed353e6ac34a76f3c2308c0
Base SHA e79af73510280e1bbb4de1ae19176d99ba0d104d

Significant changes

None

@liamaharon liamaharon merged commit 0a2e73e into develop Nov 2, 2024
5 checks passed
@liamaharon liamaharon deleted the coinbase-profit branch November 2, 2024 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants